package com.xiaogao.serviceCms.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xiaogao.commonUtils.Result;
import com.xiaogao.serviceCms.entity.CrmBanner;
import com.xiaogao.serviceCms.service.CrmBannerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 首页banner表 前台控制器
 * </p>
 *
 * @author 小高
 * @since 2021-06-24
 */
@RestController
@RequestMapping("/serviceCms/bannerFront")
@Api(description = "网站首页Banner列表")
public class BannerFrontController {

    @Autowired
    private CrmBannerService bannerService;

    @ApiOperation(value = "获取首页banner")
    @GetMapping("/getAllBanner")
    public Result getAllBanner(){

        List<CrmBanner> list = bannerService.selectAllBanner();
        return Result.ok().data("bannerList",list);
    }

}

